﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.LightSwitch;
namespace LightSwitchApplication
{
    public partial class Cancellami
    {
        partial void f_Compute(ref double result)
        {
            // Set result to the desired field value
            double tot = 0;

            foreach (var mat in this.Documento.DettagliDocumento)
            {
                tot +=  mat.Quantità * (int)mat.PrezzoUnitario;
            }

            result = tot;
        }
    }
}
